export interface ResponseData {
  code: number
  message: string
  ok: boolean
}

// 定义sku对象的ts类型
export interface SkuAttrValue {
  attrId: string | number
  valueId: string | number
  id?: number
  valueName?: string
}

export interface SkuSaleAttrValue {
  saleAttrId: string | number
  saleAttrValueId: string | number
  id?: number
  saleAttrValueName?: string
}
// 新增sku需要携带参数ts类型
export interface SkuData {
  category3Id?: string | number
  spuId?: string | number
  tmId?: string | number
  skuName?: string
  price?: string | number
  weight?: string | number
  skuDesc?: string
  skuAttrValueList?: SkuAttrValue[]
  skuSaleAttrValueList?: SkuSaleAttrValue[]
  skuDefaultImg?: string
  isSale?: number
  id?: number
  skuImageList?: any
}
// 获取sku接口返回数据类型
export interface SkuResponseData extends ResponseData {
  data: {
    records: SkuData[]
    total: number
    size: number
    current: number
    searchCount: boolean
    pages: number
  }
}

// 获取sku商品详情接口的ts类型
export interface SkuInfoData extends ResponseData {
  data: SkuData
}
